package Methods;

import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpRequestBase;

import comm.AppInterface;

public class GetDbMethod implements RequestMethods
{
	String request;

	@Override
	public void CreateRequest(String idDevice, String idMeasure, String value) 
	{
		
		 String action         = AppInterface.getPropertyByName("actiondbCrown");

		 String solutionParameter  = AppInterface.beginParameters+AppInterface.actionName+AppInterface.assignValue+action;
		 String solutionidDevice   = AppInterface.sepParameters+AppInterface.idDevice+AppInterface.assignValue+idDevice;
		 String solutionidMeasure  = AppInterface.sepParameters+AppInterface.idMeasure+AppInterface.assignValue+idMeasure;
		 String solutionValue      = AppInterface.sepParameters+AppInterface.value+AppInterface.assignValue+value;
		 
		 request=AppInterface.FormedCallRequest()+solutionParameter+solutionidDevice+solutionidMeasure+solutionValue;
		
	}

	@Override
	public HttpRequestBase GetRequestBase() 
	{
		HttpGet httpget = new HttpGet(request);
		return httpget;
	}

	@Override
	public String getDescMethod() 
	{
		
		return "GET";
	}

}
